import request from "../../http";

const orderApi = {
  async getOrderData(query) {
    return request({
      url: "/pc/orders/list",
      method: "get",
      params:query
    });
  },
  async getOrderDetail(query) {
    return request({
      url: "/api/coupon/order/user",
      method: "get",
      params:query
    });
  },
  async postOrderData(params){
    return request({
      url: "/api/order",
      method: "post",
      data:params
    });
  },
  async checkPay(orderId){
    return request({
      url:`/pc/orders/checkPay/${orderId}`,
      method: "get"
    })
  },
  // 查询可领取优惠券列表
  async getCouponList(serverId){
    return request({
      url:`/pc/coupon/list/${serverId}`,
      method:'get'
    })
  }
};

export default orderApi;